﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GtsServer.Common;
using GtsServer.DAL;
using GtsServer.Model;
using System.Data;

namespace GtsServer.Manage.Controller
{
    public class NoticeController
    {
        NoticeDAL dal = new NoticeDAL();
        public List<NoticeShow> GetList(string str="")
        {
            List<NoticeShow> list = new List<NoticeShow>();
        
            DataSet ds = dal.GetList(str);
            list = IListDataSet.DataSetToIList<NoticeShow>(ds, 0).ToList();
            return list;
        }
        public int Add(Notice models)
        {
            return dal.Add(models);
        }
        public bool Update(Notice model)
        {
            return dal.Update(model);
        }
        public bool Delete(int ID)
        {
            return dal.Delete(ID);
        }
    }
}